﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace SQLDataTransferer.Controls.Behaviours
{
    public static class ButtonBehaviours
    {
        #region EventCommands

        public static readonly DependencyProperty ButtonClickCommand = EventBehaviourFactory.CreateCommandExecutionEventBehaviour(
                                                                                                              Button.ClickEvent,
                                                                                                              "ButtonClickCommand",
                                                                                                              typeof(ButtonBehaviours));
        #endregion

        #region CommandHandlers

        // Click
        public static void SetButtonClickCommand(DependencyObject o, ICommand value)
        {
            o.SetValue(ButtonClickCommand, value);
        }

        public static ICommand GetButtonClickCommand(DependencyObject o)
        {
            return o.GetValue(ButtonClickCommand) as ICommand;
        }

        #endregion
    }
}
